#pragma once

// Separate link so when change a lib, only link needs redo.
#include "zCoreConfig.hpp"

#ifndef ZZZ_NO_PRAGMA_LIB

#ifdef ZZZ_COMPILER_MSVC

#ifdef ZZZ_LIB_ZLIB
#ifdef ZZZ_OS_WIN64
#pragma comment(lib, "zlib_x64.lib")
#else
#pragma comment(lib, "zlib.lib")
#endif
#endif

#ifdef ZZZ_LIB_ANN
#pragma comment(lib, "ann.lib")
#endif // ZZZ_LIB_ANN

#ifdef ZZZ_LIB_ANN_CHAR
#pragma comment(lib, "ann_1.1_char.lib")
#endif // ZZZ_LIB_ANN_CHAR

#ifdef ZZZ_LIB_LAPACK
#ifdef ZZZ_OS_WIN64
#pragma comment(lib, "clapack_X64.lib")
#pragma comment(lib, "libf2c_X64.lib")      // fortune to c
#pragma comment(lib, "BLAS_X64.lib")      // original blas, use this or following atlas
#else
//#pragma comment(lib, "atlas_clapack.lib")
#pragma comment(lib, "clapack.lib")
#pragma comment(lib, "libf2c.lib")      // fortune to c
//#pragma comment(lib, "BLAS.lib")      // original blas, use this or following atlas
#pragma comment(lib, "cblaswrap.lib")   // f2c_blas to c_blas
#pragma comment(lib, "libcblas.lib")    // cblas to atlas implementation
#pragma comment(lib, "libatlas.lib")    // atlas implementation
#endif // ZZZ_OS_WIN64
#endif // ZZZ_LIB_LAPACK

#ifdef ZZZ_LIB_EXIF
#ifdef ZZZ_DEBUG
#pragma comment(lib, "exiv2D.lib")
#pragma comment(lib, "libexpatD.lib")
#pragma comment(lib, "xmpsdkD.lib")
#pragma comment(lib, "zlib.lib")
#else
#pragma comment(lib, "exiv2.lib")
#pragma comment(lib, "libexpat.lib")
#pragma comment(lib, "xmpsdk.lib")
#pragma comment(lib, "zlib.lib")
#endif
#endif // ZZZ_LIB_EXIF

#ifdef ZZZ_LIB_FFTW
#pragma comment(lib, "libfftw3-3.lib")
#endif // ZZZ_LIB_FFTW

#ifdef ZZZ_LIB_GCO
#ifdef ZZZ_DEBUG
#pragma comment(lib, "gcolibD.lib")
#else
#pragma comment(lib, "gcolib.lib")
#endif // ZZZ_DEBUG
#endif // ZZZ_LIB_GCO

#ifdef ZZZ_LIB_LOKI
#ifdef ZZZ_DEBUG
#pragma comment(lib, "lokiD.lib")
#else
#pragma comment(lib, "loki.lib")
#endif
#endif // ZZZ_LIB_LOKI

#ifdef ZZZ_LIB_MINPACK
#pragma comment(lib, "cminpack.lib")
#endif // ZZZ_LIB_MINPACK

#ifdef ZZZ_LIB_TINYXML
#ifdef ZZZ_DEBUG
#pragma comment(lib, "tinyxmld_STL.lib")
#else
#pragma comment(lib, "tinyxml_STL.lib")
#endif
#endif // ZZZ_LIB_TINYXML

#ifdef ZZZ_LIB_PTHREAD
#pragma comment(lib, "pthreadVC2.lib")
#endif // ZZZ_LIB_PTHREAD

#ifdef ZZZ_LIB_SBA
#ifdef ZZZ_OS_WIN64
  #ifdef ZZZ_DEBUG
  #pragma comment(lib, "sbaD_X64.lib")
  #else
  #pragma comment(lib, "sba_X64.lib")
  #endif // ZZZ_DEBUG
#else
  #ifdef ZZZ_DEBUG
  #pragma comment(lib, "sbaD.lib")
  #else
  #pragma comment(lib, "sba.lib")
  #endif // ZZZ_DEBUG
#endif // ZZZ_OS_WIN64
#endif  // ZZZ_LIB_SBA

#ifdef ZZZ_LIB_CGAL
#ifdef ZZZ_DEBUG
#pragma comment(lib, "CGAL-vc100-mt-gd.lib")
#pragma comment(lib, "libgmp-10.lib")
#else
#pragma comment(lib, "CGAL-vc100-mt.lib")
#pragma comment(lib, "libgmp-10.lib")
#endif // ZZZ_DEBUG
#endif  // ZZZ_LIB_CGAL

#ifdef ZZZ_LIB_FAST
#ifdef ZZZ_DEBUG
#pragma comment(lib, "fastD.lib")
#else
#pragma comment(lib, "fast.lib")
#endif // ZZZ_DEBUG
#endif // ZZZ_LIB_FAST

#ifdef ZZZ_LIB_OPENCV
#ifdef ZZZ_DEBUG
#pragma comment(lib, "opencv_calib3d220d.lib")
#pragma comment(lib, "opencv_contrib220d.lib")
#pragma comment(lib, "opencv_core220d.lib")
#pragma comment(lib, "opencv_features2d220d.lib")
#pragma comment(lib, "opencv_ffmpeg220d.lib")
#pragma comment(lib, "opencv_flann220d.lib")
#pragma comment(lib, "opencv_gpu220d.lib")
#pragma comment(lib, "opencv_highgui220d.lib")
#pragma comment(lib, "opencv_imgproc220d.lib")
#pragma comment(lib, "opencv_legacy220d.lib")
#pragma comment(lib, "opencv_ml220d.lib")
#pragma comment(lib, "opencv_objdetect220d.lib")
#pragma comment(lib, "opencv_video220d.lib")
#else
#pragma comment(lib, "opencv_calib3d220.lib")
#pragma comment(lib, "opencv_contrib220.lib")
#pragma comment(lib, "opencv_core220.lib")
#pragma comment(lib, "opencv_features2d220.lib")
#pragma comment(lib, "opencv_ffmpeg220.lib")
#pragma comment(lib, "opencv_flann220.lib")
#pragma comment(lib, "opencv_gpu220.lib")
#pragma comment(lib, "opencv_highgui220.lib")
#pragma comment(lib, "opencv_imgproc220.lib")
#pragma comment(lib, "opencv_legacy220.lib")
#pragma comment(lib, "opencv_ml220.lib")
#pragma comment(lib, "opencv_objdetect220.lib")
#pragma comment(lib, "opencv_video220.lib")
#endif // ZZZ_DEBUG
#endif // ZZZ_LIB_FAST

#ifdef ZZZ_LIB_TAUCS
#pragma comment(lib, "libtaucs.lib")
#pragma comment(lib, "libmetis.lib")
#pragma comment(lib, "libf77blas.lib")
#pragma comment(lib, "clapack.lib")
#pragma comment(lib, "libf2c.lib")      // fortune to c
#pragma comment(lib, "cblaswrap.lib")   // f2c_blas to c_blas
#pragma comment(lib, "f77blaswrap.lib")   // f2c_blas to f77_blas
//#pragma comment(lib, "BLAS.lib")      // original blas, use this or following atlas
#pragma comment(lib, "libcblas.lib")    // cblas to atlas implementation
#pragma comment(lib, "libatlas.lib")    // atlas implementation

#endif  // ZZZ_LIB_TAUCS

#ifdef ZZZ_LIB_ALGLIB
#ifdef ZZZ_DEBUG
#pragma comment(lib, "alglibD.lib")
#else
#pragma comment(lib, "alglib.lib")
#endif // ZZZ_DEBUG
#endif // ZZZ_LIB_ALGLIB

#ifdef ZZZ_LIB_YAML_CPP
#ifdef ZZZ_OS_WIN64
  #ifdef ZZZ_DEBUG
  #pragma comment(lib, "yaml-cppD_X64.lib")
  #else
  #pragma comment(lib, "yaml-cpp_X64.lib")
  #endif // ZZZ_DEBUG
#else
  #ifdef ZZZ_DEBUG
  #pragma comment(lib, "yaml-cppD.lib")
  #else
  #pragma comment(lib, "yaml-cpp.lib")
  #endif // ZZZ_DEBUG
#endif // ZZZ_OS_WIN64
#endif  // ZZZ_LIB_YAML_CPP


#endif // ZZZ_COMPILER_MSVC

#endif // ZZZ_NO_PRAGMA_LIB